

import React, { Component } from 'react'
import { View, Text} from 'react-native'
import { connect } from 'react-redux'
import Nav from './src/nav';
// import Geo from './src/utils/Geo'
import configStore from './src/redux/store';
import { PermissionsAndroid } from "react-native";
import { init, Geolocation } from "react-native-amap-geolocation";
// import { Provider } from "mobx-react";
// import RootStore from "./src/mobx";

import { Provider } from 'react-redux';
const RootStore = configStore();
export class App extends Component {
  async  componentDidMount() {
        // 对于 Android 需要自行根据需要申请权限
    // await PermissionsAndroid.requestMultiple([
    //   PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
    //   PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION,
    // ]);

    // // 使用自己申请的高德 App Key 进行初始化
    // await init({
    //   ios: "dd214d97118c0102b0bf57f0363e5f20",
    //   android: "dd214d97118c0102b0bf57f0363e5f20",
    // });

    // Geolocation.getCurrentPosition(({ coords }) => {
    //   console.log(coords, '定位信息');
    // });
  }
  render() {
    return (
      <View style={{ flex: 1}}>
        <Provider store={RootStore} >
          <Nav></Nav>
        </Provider>
        {/* <Nav></Nav> */}
      </View>
    )
  }
}


export default App
